package com.gzy.rpsm.property.utils;

public class StringUtil {
    public static int getNumberFromString(String str){
        char[] chars = str.toCharArray();
        StringBuilder builder = new StringBuilder();
        for (char c:chars) {
            if(c >= '0' && c <= '9'){
                builder.append(c);
            }
        }
        return Integer.valueOf(builder.toString());
    }

    public static String numberToLen2String(int i){
        if(-1 < i && i < 10){
            return "0" + i;
        }else{
            return i+"";
        }
    }

}

